package com.example.demo.controller;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.Map;

@RestController
public class TestController {

    @GetMapping("/")
    public Map<String, Object> home() {
        Map<String, Object> response = new HashMap<>();
        response.put("message", "Flowable 学习项目");
        response.put("version", "1.0.0");
//        response.put("endpoints", Map.of(
//            "启动请假流程", "POST /api/process/leave-request?employee=张三&reason=病假&days=3",
//            "获取用户任务", "GET /api/process/tasks/user/{assignee}",
//            "获取组任务", "GET /api/process/tasks/group/{group}",
//            "完成任务", "POST /api/process/tasks/{taskId}/complete",
//            "H2控制台", "http://localhost:8080/h2-console"
//        ));
        return response;
    }

    @GetMapping("/health")
    public Map<String, String> health() {
        Map<String, String> response = new HashMap<>();
        response.put("status", "UP");
        response.put("message", "Flowable 应用运行正常");
        return response;
    }
} 